﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SupplierList.ascx.cs" Inherits="webUserControl_SupplierList" %>
<div class="code">
      点位名称：<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <asp:Button ID="Button4"
        runat="server" Text="搜索" onclick="Button4_Click" />
    <asp:Button ID="Button2" runat="server" Text="添加点位" onclick="Button2_Click" />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" 
    ConnectionString="<%$ ConnectionStrings:LinFen %>" 
    
    
        
          SelectCommand="SELECT ID, ClassName, DangCiName, CityName, SupplierName, SupplierName2, Linkman, TelPhone, Addre, NumTotal, NumReady, NumOK, NumMale, NumFemale, NumHongGan, NumBaoJian, NumQiTa, Bak, isType,districtname FROM vw_SupplierInfoDetail WHERE (CityID = @CityID) and (suppliername like '%' + @suppliername + '%') ORDER BY ID DESC">
    <SelectParameters>
        <asp:CookieParameter CookieName="cCityID" Name="CityID" Type="Int32" />
        <asp:ControlParameter ControlID="TextBox1" Name="suppliername" 
            PropertyName="Text" />
    </SelectParameters>
</asp:SqlDataSource>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:LinFen %>" 
    
    
    SelectCommand="SELECT ID, ClassName, DangCiName, CityName, SupplierName, SupplierName2, Linkman, TelPhone, Addre, NumTotal, NumReady, NumOK, NumMale, NumFemale, NumHongGan, NumBaoJian, NumQiTa, Bak, isType,districtname FROM vw_SupplierInfoDetail WHERE (CityID = @CityID) ORDER BY ID DESC">
    <SelectParameters>
        <asp:CookieParameter CookieName="cCityID" Name="CityID" Type="Int32" />
    </SelectParameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
    AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
    DataKeyNames="ID" DataSourceID="SqlDataSource2" Font-Size="12px" 
    ForeColor="#333333" GridLines="None" HorizontalAlign="Center" PageSize="20" 
    Width="100%" onrowcommand="GridView2_RowCommand">
    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
    <Columns>
        <asp:BoundField DataField="ID" HeaderText="编号" InsertVisible="False" 
            ReadOnly="True" SortExpression="ID" />
        <asp:BoundField DataField="isType" HeaderText="类型" SortExpression="isType" />
        <asp:BoundField DataField="ClassName" HeaderText="分类" 
            SortExpression="ClassName" />
        <asp:BoundField DataField="DangCiName" HeaderText="档次" 
            SortExpression="DangCiName" />
        <asp:BoundField DataField="CityName" HeaderText="城市" 
            SortExpression="CityName" />
        <asp:BoundField DataField="districtname" HeaderText="地区" 
            SortExpression="districtname" />
        <asp:BoundField DataField="SupplierName" HeaderText="点位名称" 
            SortExpression="SupplierName" />
        <asp:BoundField DataField="SupplierName2" HeaderText="楼层" 
            SortExpression="SupplierName2" />
        <asp:BoundField DataField="Linkman" HeaderText="联络人" SortExpression="Linkman" />
        <asp:BoundField DataField="TelPhone" HeaderText="电话" 
            SortExpression="TelPhone" />
        <asp:BoundField DataField="Addre" HeaderText="地址" SortExpression="Addre" />
        <asp:BoundField DataField="NumTotal" HeaderText="总点位" 
            SortExpression="NumTotal" />
        <asp:BoundField DataField="NumMale" HeaderText="男" SortExpression="NumMale" />
        <asp:BoundField DataField="NumFemale" HeaderText="女" 
            SortExpression="NumFemale" />
        <asp:BoundField DataField="NumHongGan" HeaderText="烘干机" 
            SortExpression="NumHongGan" />
        <asp:BoundField DataField="NumBaoJian" HeaderText="包间" 
            SortExpression="NumBaoJian" />
        <asp:BoundField DataField="NumQiTa" HeaderText="其他" SortExpression="NumQiTa" />
        <asp:BoundField DataField="Bak" HeaderText="备注" SortExpression="Bak" >
            <HeaderStyle Width="80px" />
            <ItemStyle Width="80px" />
        </asp:BoundField>
        <asp:HyperLinkField DataNavigateUrlFields="ID" 
            DataNavigateUrlFormatString="~/SupplierAdd.aspx?ID={0}" Text="编辑" />
        <asp:TemplateField ShowHeader="False">
            <ItemTemplate>
                <asp:Button ID="Button3" runat="server" CausesValidation="False" 
                    CommandName="DEL" Text="删除" CommandArgument='<%# Eval("ID") %>' />
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <EditRowStyle BackColor="#999999" />
    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
    AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
    DataKeyNames="ID" DataSourceID="SqlDataSource1" Font-Size="12px" 
    ForeColor="#333333" GridLines="None" HorizontalAlign="Center" PageSize="20" 
    Width="100%" onrowcommand="GridView1_RowCommand">
    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
    <Columns>
        <asp:BoundField DataField="ID" HeaderText="编号" InsertVisible="False" 
            ReadOnly="True" SortExpression="ID" />
        <asp:BoundField DataField="isType" HeaderText="类型" SortExpression="isType" />
        <asp:BoundField DataField="ClassName" HeaderText="分类" 
            SortExpression="ClassName" />
        <asp:BoundField DataField="DangCiName" HeaderText="档次" 
            SortExpression="DangCiName" />
        <asp:BoundField DataField="CityName" HeaderText="城市" 
            SortExpression="CityName" />
        <asp:BoundField DataField="districtname" HeaderText="地区" 
            SortExpression="districtname" />
        <asp:BoundField DataField="SupplierName" HeaderText="点位名称" 
            SortExpression="SupplierName" />
        <asp:BoundField DataField="SupplierName2" HeaderText="楼层" 
            SortExpression="SupplierName2" />
        <asp:BoundField DataField="Linkman" HeaderText="联络人" SortExpression="Linkman" />
        <asp:BoundField DataField="TelPhone" HeaderText="电话" 
            SortExpression="TelPhone" />
        <asp:BoundField DataField="Addre" HeaderText="地址" SortExpression="Addre" />
        <asp:BoundField DataField="NumTotal" HeaderText="总点位" 
            SortExpression="NumTotal" />
        <asp:BoundField DataField="NumMale" HeaderText="男" SortExpression="NumMale" />
        <asp:BoundField DataField="NumFemale" HeaderText="女" 
            SortExpression="NumFemale" />
        <asp:BoundField DataField="NumHongGan" HeaderText="烘干机" 
            SortExpression="NumHongGan" />
        <asp:BoundField DataField="NumBaoJian" HeaderText="包间" 
            SortExpression="NumBaoJian" />
        <asp:BoundField DataField="NumQiTa" HeaderText="其他" SortExpression="NumQiTa" />
        <asp:BoundField DataField="Bak" HeaderText="备注" SortExpression="Bak" >
            <HeaderStyle Width="80px" />
            <ItemStyle Width="80px" />
        </asp:BoundField>
        <asp:HyperLinkField DataNavigateUrlFields="ID" 
            DataNavigateUrlFormatString="~/SupplierAdd.aspx?ID={0}" Text="编辑" />
        <asp:TemplateField ShowHeader="False">
            <ItemTemplate>
                <asp:Button ID="Button1" runat="server" CausesValidation="False" 
                    CommandName="DEL" Text="删除" CommandArgument='<%# Eval("ID") %>' />
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
    <EditRowStyle BackColor="#999999" />
    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>
